﻿using System.Web.Mvc;

namespace Zsnd.Helpers {
    public static class HtmlHelpers {
        public static string Truncate(this HtmlHelper helper, string input, int length) {
            if (input.Length <= length) {
                return input;
            } else {
                return input.Substring(0, length) + "...";
            }
        }

        //public static JsonNetResult JsonNet(this Controller controller, object data) {
        //    return new JsonNetResult() { Formatting = Newtonsoft.Json.Formatting.None, Data = data };
        //}
    }
}
